/*
 * @Author: your name
 * @Date: 2022-03-30 10:23:35
 * @LastEditTime: 2022-03-30 11:28:38
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \mallAdmin\src\app\main\config\config-default-words\config-default-words.service.ts
 */
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class ConfigDefaultWordsService {

  services = {
    queryDefaultWordsUrl: '/search/details', // 默认搜索词--查询
    saveDefaultWordsUrl: '/search/save', // 默认搜索词--新增
    updateDefaultWordsUrl: '/search/update' // 默认搜索词--编辑
  }

  constructor(public httpClient: HttpClient) { }
  
  // 默认搜索词--查询
  queryDefaultWordsList(params: any) {
    return this.httpClient.post(this.services.queryDefaultWordsUrl, params).toPromise();
  }

  // 默认搜索词--新增
  saveDefaultWordsItem(params: any) {
    return this.httpClient.post(this.services.saveDefaultWordsUrl, params).toPromise();
  }

  // 默认搜索词--修改
  updateDefaultWordsItem(params: any) {
    return this.httpClient.post(this.services.updateDefaultWordsUrl, params).toPromise();
  }
}
